class CreateOrders < ActiveRecord::Migration
  def change
    create_table :orders do |t|
      t.integer  :user_id
      t.string   :address
      t.string   :phone
      t.float    :price
      t.string   :contact_name
      t.string   :area_code
      t.string   :city_code
      t.timestamps
    end
    add_index :orders, :user_id
    add_index :orders, :area_code
    add_index :orders, :city_code
  end
end
